package com.xx.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller //类注解
@RequestMapping //类注解或方法注解
@ResponseBody       //类注解或方法注解//设置当前控制器方法响应内容为当前返回值，无需解析
public class UserController {
    @RequestMapping(value = "selectAll",produces = "Application/json;charset=UTF-8")
    public String selectAll(){
        System.out.println("查询所有用户");
        return "selectAll";
    }

    @RequestMapping(value = "addUser",produces = "Application/json;charset=UTF-8")
    public String addUser(){
        System.out.println(" 增加用户信息");
        return "addUser";
    }

    @RequestMapping(value = "updateUser",produces = "Application/json;charset=UTF-8")
    public String updateUser(){
        System.out.println("修改用户信息");
        return "updateUser";
    }

    @RequestMapping(value = "delUser",produces = "Application/json;charset=UTF-8")
    public String delUser(){
        System.out.println("删除用户信息");
        return "delUser";
    }
}
